#include <iterator>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
  typedef vector<int> Cint;
  Cint c;
  for(int i = int(); i<10; i++){
    c.push_back(i*i);
  }
  copy(c.begin(),c.end(),ostream_iterator<Cint::value_type>(cout,"  "));
  cout<<endl;
  //----------------------------------------------
  Cint::iterator iter(c.begin()+4);
  cout<<*iter<<endl;
  Cint::reverse_iterator riter(iter);
  cout<<*riter<<endl;
  cout<<"*riter.base()"<<*riter.base()<<endl;
  return 0;
}
